<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>treeview</title>

    <link rel="stylesheet" href="../../plugins/editormd/lib/codemirror/codemirror.min.css">
    <script src="../../plugins/editormd/editormd.min.js"></script>
    <link rel="stylesheet" href="../../plugins/editormd/css/editormd.min.css">
    <script src="../../plugins/jquery.1.12.4.min.js"></script>
    <link rel="stylesheet" href="../../plugins/bootstrap-3.3.0/css/bootstrap.min.css">
    <script src="../../plugins/bootstrap-3.3.0/js/bootstrap.min.js"></script>
</head>
<body>

<p id="c"></p>

<!-- 按钮触发模态框 -->
<button id="create-btn" class="btn btn-primary btn-lg" data-toggle="modal"
        data-target="#myModal">
    开始演示模态框
</button>

<!-- treeview模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog"  aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    模态框（Modal）标题
                </h4>
            </div>
            <div class="modal-body">
                <div id="editor">
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default"
                        data-dismiss="modal">关闭
                </button>
                <button type="button" class="btn btn-primary" id="btn">
                    提交更改
                </button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>

<script type="text/javascript">
    $(function () {
        $("#create-btn").click(function () {
            testEditormd = editormd("editor", {
                width: "90%",
                height: 640,
                emoji: true,
                markdown: "### 动态创建 Editor.mdDynamic create Editor.md",
                path: '../../plugins/editormd/lib/'
            });
        });
    });
</script>
</body>
</html>